package cn.akwangl.design.pattern.behavioral.state.v1;

/**
 * 下午状态.
 *
 * @author youyongkun
 * @date 2021/12/6 10:34
 */
public class PMState implements State {
    private final String state = HourEnum.POST_MERIDIEM.getState();

    @Override
    public void handle(Work work) {
        if (state.equals(HourEnum.hourState(work.getTime()))) {
            System.out.println(String.format("当前时间:%s 下午工作，精神疲惫", work.getTime()));
        } else {
            //todo 判断逻辑...
            //work.setState(new State());
        }
    }
}
